/*
 * em_406a.h
 *
 *  Created on: Jun 22, 2011
 *      Author: ben
 */

#ifndef EM_406A_H_
#define EM_406A_H_

#define BAUD_RATE 4800
#define UBRRVAL ((F_CPU/(BAUD_RATE*16UL))-1)
#define NMEA_BUFFER_SIZE 100

void GPSInit(uint16_t ubrr_value);
char GPSRead();

typedef struct
{
	double fix_time;
	double latitude;
	double longitude;
	int quality;
	int satellites;
	int dilution;
	double altitude;
	double geoid;
	char NS;
	char EW;
	char checksum[3];
}GPS_DATA;

GPS_DATA processGGA(char buffer[NMEA_BUFFER_SIZE]);


#endif /* EM_406A_H_ */
